package com.bank.controller;

import com.bank.service.ProductService;
import com.bank.service.pojo.Product;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/product")
public class ProductController {
    @Resource
    public ProductService productService;

    @RequestMapping(value = "/selectProducts",method = {RequestMethod.GET,RequestMethod.POST})
    public List<Product> selectProducts(){
        return productService.selectProductList();
    }
}
